/*
 * Copyright 2008-2023 dexian.vip. All rights reserved.
 * Support: http://www.dexian.vip
 * License: http://www.dexian.vip/license
 */

package vip.dexian.core.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;

/**
 * 业务层逻辑校验异常
 *
 * @author 挺好的 2023年05月30日  11:42
 */
@Data
@EqualsAndHashCode (callSuper = false)
public class ServiceValidationException extends ValidationException {

    @Serial
    private static final long serialVersionUID = -2327846069149521534L;

    public ServiceValidationException () {
    }

    /**
     * 构造表单校验错误信息
     *
     * @param message
     *         消息
     */
    public ServiceValidationException (String message, Object... args) {
        super(message);
        this.setArgs(args);
    }

    /**
     * 构造表单校验错误消息
     *
     * @param message
     *         错误消息
     * @param cause
     *         异常
     */
    public ServiceValidationException (String message, Throwable cause, Object... args) {
        super(message, cause);
        this.setArgs(args);
    }
}
